<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>使用方法 - uniapp 安卓电话通话监听原生插件</title>
    
    
</head>
<body>
<div id="root"></div>
<script type="application/payload+json">
{"id":"W1DPl5","summary":[{"title":"使用说明","articles":[{"title":"使用方法","ref":"使用说明\/使用方法.md","path":"shiyongshuoming\/shiyongfangfa.html","metadata":{"ctime":"2024-01-09T19:44:46+08:00","mtime":"2024-04-27T14:26:33+08:00"}},{"title":"更新日志","ref":"使用说明\/更新日志.md","path":"shiyongshuoming\/gengxinrizhi.html"},{"title":"常见问题","ref":"使用说明\/常见问题.md","path":"shiyongshuoming\/changjianwenti.html"}]},{"title":"插件方法","articles":[{"title":"检测是否开启通话自动录音","ref":"插件方法\/检测是否开启通话自动录音.md","path":"chajianfangfa\/jianceshifoukaiqitonghuazidongluyin.html"},{"title":"跳转到开启通话自动录音页面","ref":"插件方法\/跳转到开启通话自动录音页面.md","path":"chajianfangfa\/tiaozhuandaokaiqitonghuazidongluyinyemian.html"},{"title":"获取所有的录音文件","ref":"插件方法\/获取所有的录音文件.md","path":"chajianfangfa\/huoqusuoyoudeluyinwenjian.html"},{"title":"根据条件获取录音文件 v1.7.0","ref":"插件方法\/根据条件获取录音文件.md","path":"chajianfangfa\/genjutiaojianhuoquluyinwenjian.html"},{"title":"注册电话监听","ref":"插件方法\/注册电话监听.md","path":"chajianfangfa\/zhucedianhuajianting.html"},{"title":"取消电话监听","ref":"插件方法\/取消电话监听.md","path":"chajianfangfa\/quxiaodianhuajianting.html"},{"title":"挂断电话 v1.1.0","ref":"插件方法\/挂断电话.md","path":"chajianfangfa\/guaduandianhua.html"},{"title":"获取所有通话记录 v1.2.0","ref":"插件方法\/获取所有通话记录.md","path":"chajianfangfa\/huoqusuoyoutonghuajilu.html"},{"title":"根据条件获取通话记录 v1.4.0","ref":"插件方法\/根据条件获取通话记录.md","path":"chajianfangfa\/genjutiaojianhuoqutonghuajilu.html"},{"title":"拨打电话 v1.3.0","ref":"插件方法\/拨打电话.md","path":"chajianfangfa\/bodadianhua.html"},{"title":"注册短信监听 v1.4.0","ref":"插件方法\/注册短信监听.md","path":"chajianfangfa\/zhuceduanxinjianting.html"},{"title":"取消短信监听 v1.4.0","ref":"插件方法\/取消短信监听.md","path":"chajianfangfa\/quxiaoduanxinjianting.html"},{"title":"是否是双卡 v1.5.0","ref":"插件方法\/是否是双卡.md","path":"chajianfangfa\/shifoushishuangka.html"},{"title":"获取手机号 v1.6.0","ref":"插件方法\/获取手机号.md","path":"chajianfangfa\/huoqushoujihao.html"},{"title":"移动文件 v1.6.0","ref":"插件方法\/移动文件.md","path":"chajianfangfa\/yidongwenjian.html"},{"title":"复制文件 v1.6.0","ref":"插件方法\/复制文件.md","path":"chajianfangfa\/fuzhiwenjian.html"},{"title":"获取当前通话状态 v1.7.0","ref":"插件方法\/获取当前通话状态.md","path":"chajianfangfa\/huoqudangqiantonghuazhuangtai.html"},{"title":"检查“所有文件”访问权限 v1.7.0","ref":"插件方法\/检查所有文件访问权限v1.7.0.md","path":"chajianfangfa\/jianchasuoyouwenjianfangwenquanxianv1.7.0.html"},{"title":"跳转到所有文件访问权限页面 v1.7.0","ref":"插件方法\/跳转到所有文件访问权限页面.md","path":"chajianfangfa\/tiaozhuandaosuoyouwenjianfangwenquanxianyemian.html"}]}],"config":{"title":"uniapp 安卓电话通话监听原生插件","themeConfig":{"navs":[{"title":"所有插件","url":"https:\/\/z7poo9xpe4.k.topthink.com\/@xzrng75p7j"}]},"plugins":["qrcode","copy-code","image-zoom","highlight"]},"file":{"path":"shiyongshuoming\/shiyongfangfa.html","content":"## 介绍\n安卓电话通话监听原生插件，支持获取所有录音文件，来电监听，去电监听，挂断电话后返回通话录音文件\n\n## 本地插件优惠\n本地插件和源码优惠进行中，有需要的可以联系作者QQ：334106817\n\n## 本地插件与云端插件的区别\n1. 云端插件仅适用于单个项目，每个项目需要购买一次\n1. 插件优化发布到云端需要审核，审核周期为3-5天\n1. 本地插件所有项目任意使用，无需发布云端无需等待插件审核，随改随用\n1. 本地插件如果需要优化，作者优化好直接通过文件发送给客户，直接将插件放入到本地项目中即可使用既方便又快捷\n\n## 插件适配的机型\n1. 华为\n1. 荣耀\n1. vivo\n1. oppo\n1. 小米\n1. 魅族\n1. 一加\n1. 联想\n1. 中兴\n1. 摩托罗拉\n> **需要适配其他机型，请联系作者 QQ：334106817** \n\n## 超级福利\n[超级福利，点击查看](https:\/\/z7poo9xpe4.k.topthink.com\/@ln2qwd82dg)\n\n## 插件地址\n<https:\/\/ext.dcloud.net.cn\/plugin?id=16275>\n\n## 权限\n1. android.permission.READ_PHONE_STATE\n1. android.permission.CALL_PHONE\n1. android.permission.READ_CALL_LOG\n1. android.permission.WRITE_CALL_LOG\n1. android.permission.RECORD_AUDIO\n1. android.permission.WRITE_EXTERNAL_STORAGE\n1. android.permission.READ_EXTERNAL_STORAGE\n\n## 示例文件下载\n:attachment[安卓电话通话监听原生插件示例文件 v1.7.0.zip]{src=\"..\/.topwrite\/assets\/安卓电话通话监听原生插件示例文件 v1.7.0.zip\" size=\"172.61 kB\"}\n>如果下载的文件不是zip文件，请将扩展名改为zip即可\n\n## 演示程序下载\n百度网盘\n下载地址：<https:\/\/pan.baidu.com\/s\/1XASDqERIa7MD1SBZ-9ikXg>\n提取码：hrth\n\n## 用法\n在需要使用插件的页面加载以下代码\n```\nconst module = uni.requireNativePlugin(\"leven-call-CallModule\");\n```\n\n## 页面内容\n```\n<template>\n  <view>\n    <uni-card title=\"安卓电话通话监听原生插件\">\n      <button type=\"primary\" @click=\"checkCallAutoRecorder\">检测是否开启通话自动录音<\/button>\n      <button type=\"primary\" @click=\"toCallAutoRecorderPage\">跳转到开启通话自动录音页面<\/button>\n      <button type=\"primary\" @click=\"getAllRecorderFiles\">获取所有的录音文件<\/button>\n      <button type=\"primary\" @click=\"registerListener\">注册电话监听<\/button>\n      <button type=\"primary\" @click=\"unRegisterListener\">取消电话监听<\/button>\n      <button type=\"primary\" @click=\"logStr = ''\">清空日志<\/button>\n    <\/uni-card>\n    <view>\n      <uni-card class=\"uni-card-box\" title=\"日志\">\n        <view><text style=\"font-size: 14px; flex-wrap: wrap;\">{{logStr}}<\/text><\/view>\n      <\/uni-card>\n    <\/view>\n  <\/view>\n<\/template>\n\n<script>\n  const module = uni.requireNativePlugin(\"leven-call-CallModule\");\n  export default {\n    data() {\n      return {\n        logStr: \"\",\n      }\n    },\n    methods: {\n      \/\/ 检测是否开启通话自动录音\n      checkCallAutoRecorder() {\n        module.checkCallAutoRecorder(res => {\n          this.writeLog(JSON.stringify(res))\n        });\n      },\n      \/\/ 跳转到开启通话自动录音页面\n      toCallAutoRecorderPage() {\n        module.toCallAutoRecorderPage(res => {\n          this.writeLog(JSON.stringify(res))\n        });\n      },\n      \/\/ 获取所有录音文件\n      getAllRecorderFiles() {\n        module.getAllRecorderFiles(res => {\n          this.writeLog(JSON.stringify(res))\n        });\n      },\n      \/\/注册电话监听\n      registerListener() {\n        module.registerListener(res => {\n          this.writeLog(JSON.stringify(res))\n        });\n      },\n      \/\/取消电话监听\n      unRegisterListener() {\n        module.unRegisterListener(res => {\n          this.writeLog(JSON.stringify(res))\n        });\n      },\n      \/\/ 写日志\n      writeLog(str) {\n        console.log(str)\n        let logStr = uni.$lv.date.format(null, \"yyyy-mm-dd hh:MM:ss\") + \" \" + str + \"\\n\";\n        \/\/ let logStr = str + \"\\n\";\n        this.logStr = logStr + this.logStr;\n      }\n    }\n  }\n<\/script>\n\n<style>\n\n<\/style>\n```\n\n","meta":{"ctime":"2024-01-09T19:44:46+08:00","mtime":"2024-04-27T14:26:33+08:00"}},"lfs":{"url":"https:\/\/z7poo9xpe4.k.topthink.com\/lfs\/{oid}","files":{".topwrite\/assets\/安卓电话通话监听原生插件示例文件 v1.0.0.zip":"7612facf1508936adf74d1391b75f9c042bdc7c83a74630a750092ecbbc7a36b",".topwrite\/assets\/安卓电话通话监听原生插件示例文件 v1.5.0.zip":"cc1e7fc70d1b0d2dad89fffe2662bb97293c12aa519ac07ff3014131ebeeada1",".topwrite\/assets\/安卓电话通话监听原生插件示例文件 v1.7.0.zip":"a3caf11b3d4788542ecbda1bd84dba2790a4e96037dc4720715c5407ad4c6987"}},"options":{"poweredBy":{"name":"顶想云","link":"https:\/\/www.topthink.com"}}}
</script>

    <script src="../asset/lodash/lodash.min.js?v=4.17.21"></script>

    <script src="../asset/react/react.production.min.js?v=18.2.0"></script>

    <script src="../asset/react-dom/react-dom.production.min.js?v=18.2.0"></script>

    <script src="../asset/reader/index.js?v=1.0.71"></script>

    <script src="../asset/plugins/theme-default/index.js?v=1.0.30"></script>

    <script src="../asset/plugins/highlight/index.js?v=1.0.4"></script>

    <script src="../asset/plugins/knowledge/index.js?v=0.0.18"></script>

    <script src="../asset/plugins/image-zoom/index.js?v=0.0.1"></script>

    <script src="../asset/plugins/copy-code/index.js?v=0.0.2"></script>

    <script src="../asset/plugins/qrcode/index.js?v=0.0.1"></script>

    <script src="../asset/plugins/components/index.js?v=0.0.7"></script>

<script type="text/javascript">
    TopWrite.bootstrap();
</script>
</body>
</html>
